package  com.rhb.oa.news.bean;

import java.text.*;
import java.util.*;

public class News implements java.io.Serializable {
	public News(){}

	//-----start newsPk-----//
	private String newsPk;
		
	public void setNewsPk(String newsPk) {
		this.newsPk = newsPk;
	}

	public String getNewsPk() {
		return this.newsPk;
	}
	//-----end newsPk-----//

	//-----start title-----//
	private String title;
		
	public void setTitle(String title) {
		this.title = title;
	}

	public String getTitle() {
		return this.title;
	}
	//-----end title-----//

	//-----start type-----//
	private String type;
		
	public void setType(String type) {
		this.type = type;
	}

	public String getType() {
		return this.type;
	}
	//-----end type-----//

	//-----start content-----//
	private String content;
		
	public void setContent(String content) {
		this.content = content;
	}

	public String getContent() {
		return this.content;
	}
	//-----end content-----//

	//-----start madeDate-----//
	private java.util.Date madeDate;
		
	public void setMadeDate(String madeDate) {
		try{
			java.text.SimpleDateFormat format = new java.text.SimpleDateFormat("yyyy-MM-dd HH.mm");
			java.util.Calendar calendar = java.util.Calendar.getInstance();
			this.madeDate = format.parse(madeDate);
		}catch (Exception e1){
			this.madeDate = null;
		}
	}
		
	public void setMadeDate(java.util.Date madeDate) {
		this.madeDate = madeDate;
	}

	public java.util.Date getMadeDate() {
		return this.madeDate;
	}
	//-----end madeDate-----//

	//-----start madePersonPK-----//
	private String madePersonPK;
		
	public void setMadePersonPK(String madePersonPK) {
		this.madePersonPK = madePersonPK;
	}

	public String getMadePersonPK() {
		return this.madePersonPK;
	}
	//-----end madePersonPK-----//

	//-----start madePersonName-----//
	private String madePersonName;
		
	public void setMadePersonName(String madePersonName) {
		this.madePersonName = madePersonName;
	}

	public String getMadePersonName() {
		return this.madePersonName;
	}
	//-----end madePersonName-----//

	public int hashCode() {
		final int prime = 31;
		int result = 1;
    			result = prime * result
				+ ((newsPk == null) ? 0 : newsPk.hashCode());
				result = prime * result
				+ ((title == null) ? 0 : title.hashCode());
				result = prime * result
				+ ((type == null) ? 0 : type.hashCode());
				result = prime * result
				+ ((content == null) ? 0 : content.hashCode());
				result = prime * result
				+ ((madeDate == null) ? 0 : madeDate.hashCode());
				result = prime * result
				+ ((madePersonPK == null) ? 0 : madePersonPK.hashCode());
				result = prime * result
				+ ((madePersonName == null) ? 0 : madePersonName.hashCode());
				return result;
	}

	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		
		if (obj == null)
			return false;
		
		if (getClass() != obj.getClass())
			return false;

		final News other = (News) obj;

    			if (newsPk == null) {
			if (other.newsPk != null)
				return false;
		} else if (!newsPk.equals(other.newsPk))
			return false;
				if (title == null) {
			if (other.title != null)
				return false;
		} else if (!title.equals(other.title))
			return false;
				if (type == null) {
			if (other.type != null)
				return false;
		} else if (!type.equals(other.type))
			return false;
				if (content == null) {
			if (other.content != null)
				return false;
		} else if (!content.equals(other.content))
			return false;
				if (madeDate == null) {
			if (other.madeDate != null)
				return false;
		} else if (!madeDate.equals(other.madeDate))
			return false;
				if (madePersonPK == null) {
			if (other.madePersonPK != null)
				return false;
		} else if (!madePersonPK.equals(other.madePersonPK))
			return false;
				if (madePersonName == null) {
			if (other.madePersonName != null)
				return false;
		} else if (!madePersonName.equals(other.madePersonName))
			return false;
				
		return true;
	}
}
